

package jhave.client;

import javax.swing.*;
import java.util.*;
import java.awt.*;
import org.jdom.Element;

/**
 *
 * @author bosmak40
 */
public class ClickingArea_Element extends JHAVE_Abstract_ClickingArea_Element implements JHAVE_Element{


    ClickingArea_Element(Element child, JPanel returnedPanel, Vector components, int mode, boolean clickingArea){
        super(child, returnedPanel, components, mode, clickingArea);
    }


     /**
     * Adds ClickArea element to panel and to components vector.
     *
     */
    public void addElementToPanel(){
        Iterator iter = child.getChildren().iterator();
        JHAVE_ClickingArea_Factory factory = new JHAVE_ClickingArea_Factory();

        while(iter.hasNext()){
            Element newChild = (Element) iter.next();
            factory.get_JHAVE_Element(newChild, this.returnedPanel,this.components, this.mode, this.clickingArea);
            this.returnedPanel = factory.returnPanel();
            this.components = factory.returnComponents();
            this.mode = factory.returnMode();
            this.clickingArea = factory.returnClickingArea();
        }
    }


}
